<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<div class="row">
    <div class="col-lg-12">
        <div class="panel">
            <div class="panel-heading">
                <h3 class="panel-title">公司资质登记表</h3>
            </div>

            <!-- BASIC FORM ELEMENTS -->
            <!--===================================================-->
            <form id="form_cert_input" class="panel-body form-horizontal form-padding">
                <input type="hidden" name="keyId" id="keyId" value="${cert.id}" />
                <div class="form-group">
                    <label class="col-md-2 control-label">资质类别<i class="fa fa-asterisk txt-color-red"></i>
                    </label>
                    <div class="col-md-6">
                        <input type="text" id="certType" name="certType" class="form-control" value="${cert.certType==1?'企业证照':'企业资质'}" disabled>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">资质名称<i class="fa fa-asterisk txt-color-red"></i></label>
                    <div class="col-md-6">
                        <input type="text" id="certDictItemId" name="certDictItemId" class="form-control" value="${cert.certDictItem.name}" disabled>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">证书/资质号<i class="fa fa-asterisk txt-color-red"></i></label>
                    <div class="col-md-6">
                        <input type="text" id="certNo" name="certNo" class="form-control" value="${cert.certNo}" disabled>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">
                        办理人员
                        <i class="fa fa-asterisk txt-color-red"></i>
                    </label>
                    <div class="col-md-6">
                        <input type="text" id="userName" name="userName" class="form-control" value="${cert.handler.name}" disabled>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">评定日期<i class="fa fa-asterisk txt-color-red"></i></label>
                    <div class="col-md-2">
                            <div class="input-group date">
                                <input type="text" class="form-control" id="datEvaluate" name="datEvaluate" disabled
                                value=<fmt:formatDate pattern="yyyy-MM-dd" value="${cert.datEvaluate}" /> >
                                <span class="input-group-addon"><i class="ti-calendar"></i></span>
                            </div>
                    </div>
                    <label class="col-md-2 control-label">有效期限<i class="fa fa-asterisk txt-color-red"></i></label>
                    <div class="col-md-2">
                        <div class="input-group date">
                            <input type="text" class="form-control" id="datValid" name="datValid" disabled
                                   value=<fmt:formatDate pattern="yyyy-MM-dd" value="${cert.datValid}" /> >
                            <span class="input-group-addon"><i class="ti-calendar"></i></span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">提交人</label>
                    <div class="col-md-2">
                        <p class="form-control-static">${cert.creater.name}</p>
                    </div>
                    <label class="col-md-2 control-label">提交日期</label>
                    <div class="col-md-2">
                        <p class="form-control-static"><fmt:formatDate pattern="yyyy-MM-dd" value="${cert.dateApply}" /></p>
                    </div>
                </div>
            </form>
            <!--===================================================-->
            <!-- END BASIC FORM ELEMENTS -->

            <div class="panel-footer">
                <a class="btn btn-default" id="apply-re-common" href="javascript:void(0)">
                    <i class="fa fa-lg fa-mail-reply"></i> 返回视图
                </a>
                <c:if test="${cert.numStatus==0 && user.id==cert.creater.id}">
                    <a class="btn btn-warning" key="ajax_cert_edit" href="javascript:void(0);"><i class="fa fa-lg fa-edit"></i> 编辑表单 </a>
                </c:if>
            </div>
        </div>
    </div>
</div>

<script>

    //编辑
    $("a[key='ajax_cert_edit']").unbind("click").bind("click",function(){
        loadURL("<%=path%>/activiti/cert/edit/"+$("#keyId").val(),$('#page-content'));
    });

    //返回视图
    $("#apply-re-common").click(returnToHashUrl);

    // 加载完成后执行
    $(function(){

    })

</script>




